<template>
    <div class="detail">
        <div class="top">
            <span class="atext" @click="$router.push('/diary/home')">返回</span>
        </div>
        <header>
            {{getArticle.title}}
        </header>
        <main>
            {{getArticle.content}}
        </main>
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
export default{
    computed: {
        ...mapGetters([
            'getArticle',
        ])
    },
    mounted(){
        console.log('getArticle',this.getArticle)
    }
}
</script>
<style scoped lang="less">
.detail{
    margin: 1em auto;
    width: 68%;
    .top{
        text-align: right;
        font-size: 1.4em;
    }
    header{
        text-align: center;
        margin: 1em 0;
        font-size: 1.2em;
    }
    main{
        text-indent: 2em;
    }
}

</style>

